home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
018a
/
mpe4wp12.zip
/
README.MPE
< prev
next >
Wrap
Text File
|
1991-10-03
|
31KB
|
634 lines
MPE4WP
MACRO PROGRAMMING ENVIRONMENT FOR WORDPERFECT
A Program by Michael H. Shacter
7825 Marion Lane
Bethesda, Maryland 20814
MPE4WP is the Macro Programming Environment for WordPerfect.
MPE4WP is a superior substitute to the WordPerfect Macro Editor.
MPE4WP permits the creation and editing of WordPerfect macros on
the full WordPerfect editing screen, using all the advanced
editing features offered by WordPerfect. (You may also use
create macros using any text editor or word processor that saves
text in ASCII format.) MPE4WP includes programs that convert
macros to and from text, and macros that improve upon the
features of the macro editor, including a macro that emulates the
macro recorder.
This README file contains a brief description of MPE4WP with
an overview of its features. The User Reference Guide
(MANUAL.MPE) presents a complete explanation of all MPE4WP
features. Incidentally, the length of the documentation is
inversely proportional to the difficulty of using MPE4WP. In
other words, the documentation is long in order to cover all
topics completely, but MPE4WP is very easy to use.
All the MPE4WP features are described in detail in the
accompanying User Reference Guide (MANUAL.MPE), which is
formatted as a WordPerfect document. A few of the features
offered by MPE4WP are:
■ Insert Macro Commands, complete with tildes, using no
more than three keystrokes
■ Instantaneously switch back and forth between recording
and editing a macro
■ Use numbers rather than control or ASCII characters to
position characters on macro screens
■ Draw boxes using WordPerfect's line draw feature
■ Convert existing macros into ASCII text for further
editing or printing
■ Block, copy and move Macro Commands and text
■ Easily cut and paste routines from other macros
■ Use search and replace tools to debug and edit macros
quickly
■ Draft, edit and spell check text of any length for
inclusion in macros
■ Create and edit macros that are too big for the Macro
Editor
■ Employ the entire WordPerfect character set in your
macros, in a simple intuitive fashion
■ Use DOS wild cards to process several files in one
operation
■ Extend the number of ALT key macros from 26 to more than
130
Until now, editing WordPerfect macros was not easy. The
built-in WordPerfect Macro Editor lacks all but the most
primitive editing functions. Even the simplest edits are
difficult. To move a line of code in the Macro Editor, the line
must be deleted, one character at a time, then re-typed at its
new location, with the hope that no errors will be introduced in
the process.
Some of these shortcomings are remedied by the ED program,
available from WordPerfect Corporation for an additional fee.
Unfortunately, you cannot access WordPerfect's menus, when using
ED. Therefore, you must know in advance the keystrokes that are
necessary for your macro. This can be difficult because
WordPerfect has at least three sets of menus, each with its own
keystrokes. One set is for routine editing. Another set comes
into play when you Search for a code. And still a third set
becomes active when Block is on.
The optimal macro editor should support all of WordPerfect's
editing features and should allow instant access to and recording
of all keystrokes required to use WordPerfect's menus. MPE4WP
fulfills these requirements and does much more.
For example, MPE4WP includes a Record Mode that provides all
the functionality of WordPerfect's macro recording, but with the
additional capability of allowing you to record and edit
interchangeably.
Because of MPE4WP's memory conservation techniques, you may
still create your macros without ever leaving WordPerfect, by
using the Shell/Dos feature. And MPE4WP's speed will
considerably shorten the time required to create and edit macros.
MPE4WP is suited for both advanced and novice macro.
Beginning macro programmers will find all the tools needed to
learn how to create macros for streamlining and customizing
WordPerfect. If you have been deterred from experimenting with
macros by the aggravation attendant upon using the WordPerfect
Macro Editor, now is the time to start learning. Advanced macro
programmers will have access to superior programming tools and
will never be impeded with by safeguards for the beginners.
MPE4WP consists of three tools to overcome the inadequacies
of the WordPerfect Macro Editor:
(1) MC.COM, the Macro Compiler, compiles (converts) ASCII
text into WordPerfect macros. MC.COM is blazingly fast and
minimizes memory usage, so it can be used without ever leaving
WordPerfect, by using the Shell/Dos feature. MC.COM includes
advanced features not available through the WordPerfect Macro
Editor to simplify writing WordPerfect macros.
(2) M2T.COM, the Macro Decompiler, reverses the task
accomplished by MC.COM, converting WordPerfect macros into simple
ASCII text. You can use M2T.COM to examine, modify, or print
macros created by yourself or others, outside the confines of the
Macro Editor.
(3) The Macro Programming Environment, which includes the
MPE4WP keyboard and a series of macros, facilitates the creation
of macros at the WordPerfect editing screen. Macro Commands are
no more than three keystrokes away and are inserted in your
macros complete with tildes and the cursor correctly positioned
to take the next argument. Key Commands can be added by pressing
the key represented by the command. You may record keystrokes
and access menus in the same manner as you would with the macro
recorder, without leaving the editing screen. Help screens are
accessible with a single keystroke. Incorrect Macro and Key
Commands can be deleted by striking one key.
MPE4WP is fully compatible with all releases of
WordPerfect 5.1. With three minor exceptions relating to Key
Command syntax, MC.COM and M2T.COM are also compatible
WordPerfect 5.0. Of course, if you are still using WordPerfect
5.0, you must restrict yourself to the Macro and Key Commands
available in version 5.0. For a list of commands available in
both versions 5.1 and 5.0, please see the file COMMAND.LST.
Regrettably, the MPE4WP macros will not work in WordPerfect 5.0.
Even without the MPE4WP macros, you will find yourself more
productive at the normal WordPerfect editing screen or in your
favorite editor than in the Macro Editor.
Information concerning registration and licensing of MPE4WP
may be found at the end of the User Reference Guide in the
section entitled "REGISTRATION/LICENSE/COPYRIGHT". In brief,
there is a $15 registration fee for personal use of MPE4WP. A
license is required for business use.
QUICK START
The following Quick Start information is for those who
resist reading documentation or who at least want to get their
feet wet before taking the plunge. Don't be discouraged if you
are a novice and are confused by the Quick Start explanation.
More detailed information in simple English is presented in the
accompanying User Reference Guide (see the file MANUAL.MPE). In
addition, there is a Glossary for novices at the end of this
document.
The MPE4WP package contains the following files:
README.MPE MPE4WP Quick Start and Glossary
MANUAL.MPE MPE4WP User Reference Guide formatted as a
WordPerfect document
MC.COM Macro Compiler described in MANUAL.MPE and
README.MPE
M2T.COM Macro Decompiler described in MANUAL.MPE and
README.MPE
MPE4WP-I.WPK Integrated MPE4WP keyboard described in
MANUAL.MPE and README.MPE
MPE4WP.WPK Alternative MPE4WP keyboard described in
MANUAL.MPE and README.MPE
CMDS_A-L.WPM MPE4WP operational macros for use with MPE4WP.WPK
CMDS_M-Z.WPM keyboard described in MANUAL.MPE and README.MPE
{CREATE}.WPM (Do not install these macro files, if you elect
{EXPAND}.WPM to use the MPE4WP-I.WPK keyboard)
{HELP}.WPM
{INSERT}.WPM
{KEY}.WPM
{RECORD}.WPM
{SPCIAL}.WPM
MPE4WP.WPK MPE4WP keyboard described in MANUAL.MPE and
README.MPE
COMMAND.LST List of Commands supported by MPE4WP
described in MANUAL.MPE and README.MPE
COMMAND.WPM Test macro described in COMMAND.LST
REGISTER.FRM Convenient form for registering MPE4WP
WHATS.NEW Information on changes from Version 1.0
MPE4WP is furnished with two alternative keyboard files:
MPE4WP.WPK and MPE4WP-I.WPK. The MPE4WP.WPK keyboard works in
tandem with an external set of macro files. In contrast,
MPE4WP-I.WPK is an integrated keyboard in which the macros have
been incorporated into the keyboard file, eliminating the need
for the external macro files. Each approach has its advantages
and disadvantages. In favor of MPE4WP-I.WPK, fewer files are
required, and the macros should execute more quickly on slower
machines. The advantage of MPE4WP.WPK is better memory
conservation since the external macros are loaded and released
from memory one at a time. For most users memory economization
will not be an issue, so MPE4WP-I.WPK will be the better choice.
Complete installation instructions are set out in the User
Reference Guide. Copy either MPE4WP.WPK or MPE4WP-I.WPK to the
same directory as your other macros and keyboard files. If you
opt for MPE4WP.WPK, the MPE4WP macro files (*.WPM) should also be
copied to your macro directory. (For information about locating
the MPE4WP macros in a different directory, see the section
entitled "{One-Key} Macros and XALT Keys" in the User Reference
Guide.) Ideally, MC.COM and M2T.COM should be placed in a
directory on your path. Now start WordPerfect, if you are not in
it already, select the MPE4WP or MPE4WP-I keyboard file in Setup,
and you are ready to use MPE4WP.
MC.COM reads an ASCII text file (the "source file") and
converts it to a WordPerfect macro. If you are editing macros in
WordPerfect, you must first save your source file in Generic WP
format. To save your source file in Generic WP format, press
Text In/Out (CTRL-F5); now select 3 Save [A]s; then press 1
[G]eneric. You may also use the MPE4WP Save Generic macro
(CTRL-G). In general, the source file will look exactly the same
as the text that appears on the screen when you call the
WordPerfect Macro Editor to edit a macro with the exceptions
noted below.
Use ordinary spaces, not the centered dots (ASCII 250)
utilized by the Macro Editor. Tabs and hard returns are
understood as formatting commands, just as they are by the Macro
Editor. Case is not important when entering Macro and Key
Commands, but spelling is. If you have any doubts about the
correct spelling of a command, consult the COMMAND.LST file. Use
the MPE4WP macros described below and you will never have to
worry about spelling errors.
MC.COM expects that any text beginning with an open brace
({) is the beginning of a Macro Command, a Key Command, or one of
the following special keys: {ALT x}, where "x" is any legal
character, {KEY MACRO n}, where "n" is the number of a Key Macro,
or {VAR n}, where "n" is a number from 0 to 9. (See the section
entitled "{One-Key Macros and XALT Keys" in the User Reference
Guide for a discussion of "legal" characters.) If you want to
treat the open brace as text, or if you want the command to
appear as text, simply add an extra open brace, so your source
file would look like this: {{. Failure to add an open brace
before ordinary text will result in a harmless error message;
MC.COM will still treat the open brace as text. To treat a
command as text (you usually won't), you must add the extra open
brace.
Instead of using cryptic Key Commands or ASCII characters in
connection with the character positioning character code {^P},
you may use the notation {n} (where "n" is any number between 0
and 254) to represent column and/or row numbers. Thus, if you
want to position a prompt at column 3, row 65, you simply type
{^P}{3}{65}. The {n} notation may also used to enter any ASCII
character between 1 and 254 and is strongly recommended for
control codes (ASCII 1 to 31). For information on how
WordPerfect's automatic paragraph numbering may be advantageously
employed in connection with MPE4WP's character positioning
notation, see the section in the User Reference Guide entitled
"Making Boxes with MPE4WP". The command {0} is correctly
interpreted as the appropriate WordPerfect code (ASCII 254) to
position the cursor at column or row 0. Any character in the
WordPerfect character set may be entered using the shorthand
command {s,n}, where "s" is the number of the character set and
"n" is the number of the character within the set. Thus, the
copyright symbol--"C" in a circle--which is character number 23
in character set number 4, would be {4,23}.
In addition to the WordPerfect macro comment ({;}), MPE4WP
also supports silent comments, which are ignored when MC.COM
compiles your macro. The beginning of a silent comment is marked
by a colon in braces: "{:}" and, like the WordPerfect comment,
terminated by a tilde. For example, {:}This is a silent
comment~.
A macro may contain an optional description. The
description should be preceded by the command {DESCRIPTION}
(upper-case, lower-case or any combination of the two is ok) and
terminated by either a tilde or a hard return. WordPerfect
imposes a 39-character limitation on the length of a description,
so MC.COM will truncate any description that is longer than 39
characters. The description may be on a line by itself or on a
line with other commands. To minimize complication, place the
description at the top of the macro source file. The description
may, however, be placed anywhere within the first 4000 characters
of the source file. If you have a reason for using the command
{DESCRIPTION} as text, precede it with an extra open brace, like
this: {{DESCRIPTION}.
You may also use the optional notation {MACRO CMD n} and
{KEY CMD n}, where "n" is the number of a Macro or Key Command.
The main use of this feature is to allow access to new Macro and
Key Commands added in any future interim releases of WordPerfect.
For more information on this feature, see the section entitled
"Anti-Obsolescence" in the User Reference Guide.
Once you have created your source file, you compile it (i.e.
convert it to an operational macro) with MC.COM. To run MC.COM
you only need to type MC at the DOS command line (assuming MC.COM
is on your path). Alternatively, you may run MC.COM from within
WordPerfect. The simplest way to run MC.COM from within
WordPerfect is to use the MPE4WP Create macro (CTRL-C). If
MC.COM is not on your path, you should edit the Create macro,
following the instructions at the beginning of the macro, to
specify the full path name of MC.COM. (Editing Create to specify
the full path name is a good idea, even if MC.COM is on your
path. For additional information about editing Create, see the
section entitled "Create" in the User Reference Guide.)
Otherwise, you type CTRL-F1 (Shell) and select 2 DOS [C]ommand.
Now type MC at the DOS Command prompt. If MC.COM is not on your
path, you should give the full path name.
MC.COM will prompt you for the name of your source file and
the name of your macro file. MC.COM provides on-screen
instructions and helps you correct errors.
For your convenience, MC.COM also permits you to enter
optional commands when you start the program. The full syntax
for MC.COM is:
MC [/M] [/N] [Source file] [Macro file]
The brackets ([]) are not typed and indicate that the
parameters are optional. The options have the following
meanings:
/M Force monochrome display
/N No error file. Tell MC.COM not to create
the file MC.ERR. For additional information
on MC.ERR, please see the User Reference
Guide.
Source file The name of the file that will be converted
to a macro. Full path names and wild cards
are permitted. If you specify a source file
only and do not specify a macro file name,
the new macro will be placed in the same
directory as the source file with the same
root name and the extension "WPM".
Macro file The name of your new macro. If you specify
the destination directory only and do not
specify a macro file name, the new macro
will have the same root name as the source
file and the extension "WPM". If you
specify a macro file name only and do not
specify a path, the macro will be placed in
the default directory. If you omit the
extension of the macro file, the extension
"WPM" will be added. In wild card
operations, only the destination directory
may be specified.
If you make a mistake at the command line entering the
source file or the macro file, MC.COM will advise you of the
error and assist you in remedying it.
You use M2T.COM to decompile macros; i.e. convert them to
ASCII text. M2T.COM is similar in operation to MC.COM. You run
M2T.COM by typing M2T at the DOS command line or from within
WordPerfect. You will be prompted for the name of your macro
file and the name of your text file. If an existing macro
contains a description, M2T.COM will automatically add a
description statement to the top of the output file.
Before processing a file, M2T.COM will verify that it is a
macro file. Where possible, M2T.COM offers a choice of
overriding its conclusion. You may also terminate processing,
revise the file name when processing a single file, or skip to
the next file in a wildcard operation.
For your convenience, M2T.COM also permits you to enter
optional commands when you start the program. The full syntax
for M2T.COM is:
M2T [/M] [Macro file] [Text file]
The brackets ([]) are not typed and indicate that the
parameters are optional. The options have the following
meanings:
/M Force monochrome display
Macro file The name of the macro file that will be
converted to text. Full path names and wild
cards are permitted. The extension "WPM"
will be added if you omit an extension. If
you specify a macro file only and do not
specify a text file name, the text file will
be placed in the same directory as the macro
with the same root name and the extension
"TXT".
Text file The name of your text file. If you specify
the destination directory only and do not
specify a text file name, the text file will
have the same root name as the macro and the
extension "TXT". If you specify a text file
name only and do not specify a path, the
macro will be placed in the default
directory. If you omit the extension of the
text file, the extension "TXT" will be
added. In wild card operations, only the
destination directory may be specified.
MPE4WP is supplied with a set of macros to simplify creating
and editing macros at the WordPerfect editing screen. Each macro
is assigned a key on one of the MPE4WP keyboards. The MPE4WP-I
uses Key Macros exclusively. The MPE4WP keyboard uses a
combination of Key Macros and {One-Key} Macros. A {One-Key}
macro is a Key Macro in the form "{Macro}[drive:\path\]macroname
{Enter}". {One-Key} Macros may be assigned to any key that is
recognized by WordPerfect. Like ALT keys and XALT keys, a
{One-Key} Macro can be both defined and run with a single
keystroke. For more information on how to create and use
{One-Key} Macros, please see the section entitled "{One-Key}
Macros and XALT Keys" in the User Reference Guide.
The following table lists each of the MPE4WP macros,
identifies the key to which it is assigned, and summarizes the
use of each key. The macro file associated with the key on the
MPE4WP keyboard is also listed. (Note: The macro file name is
irrelevant to the MPE4WP-I keyboard because all its macros are
Key Macros.) You will notice that the root names of many of the
MPE4WP macros are enclosed in braces. The purpose of the braces
is to avoid name conflicts with existing macros. You may already
have a macro named CREATE.WPM, but are unlikely to have one named
{CREATE}.WPM. The operation of all macros is described in detail
in the User Reference Guide.
MPE4WP MACROS
Name Key File name Summary
Help CTRL-H {HELP}.WPM Just what its name suggests
Record Mode CTRL-R {RECORD}.WPM Record keystrokes in
WordPerfect in an analogous
manner to macro recording
Insert Mode CTRL-I {INSERT}.WPM Insert Key Commands in an
analogous manner to the Macro
Editor's Command Insert Mode
Key CTRL-K {KEY}.WPM Insert a single Key Command
in an analogous manner to
pressing CTRL-V in the Macro
Editor
Special Keys CTRL-S {SPCIAL}.WPM Insert the commands {ALT x},
{KEY MACRO n} and {VAR n}
Macro CTRL-{ CMDS_A-L.WPM Help screen of Macro Commands
Commands from A to L; insert a command
(A-L) (with tildes) by typing
two-key mnemonic
Macro CTRL-} CMDS_M-Z.WPM Help screen of Macro Commands
Commands from M to Z; insert a command
(M-Z) (with tildes) by typing
two-key mnemonic
Expand CTRL-X {EXPAND}.WPM Type two-key mnemonic then
press CTRL-X to expand to
Macro Command with tildes;
uses same mnemonics as CTRL-{
and CTRL-}, but without help
screens
Delete CTRL-D Key Macro Delete Macro or Key Command
on which cursor is located;
if cursor is not on a
command, delete first command
to left
Create CTRL-C {CREATE}.WPM Run MC.COM from within
WordPerfect
Save Generic CTRL-G Key Macro Save file in Generic Word
Processing format
Clear Prompt CTRL- Key Macro Clear status prompt from
Print screen in the event of
Screen unanticipated errors
Playback CTRL-P Key Macro Play back recording in case
of unanticipated
interruptions
If you have questions about any instructions contained in
the Quick Start section of this document, please refer to the
User Reference Guide (MANUAL.MPE). The User Reference Guide also
discusses subjects such as Key Macros and Programming Tips, that
are not addressed in this document. The balance of this file is
devoted to a few definitions that may be instructive to novice
macro programmers.
GLOSSARY
"ASCII characters". Simply put, ASCII characters are the
characters that appear on your computer's screen and in simple
text files. The ASCII character set is generally thought of as
being composed of three divisions. The first 31 ASCII characters
are referred to as control codes. They often have funny
appearances, like the happy faces, and usually are not
incorporated in text (with the exception of and , ASCII 20 and
21, respectively). The control codes also include text
formatting characters like the hard tab (ASCII 9), carriage
return (ASCII 13), and line feed (ASCII 10).
The next 64 characters (ASCII 32 through 127) include the
alphabet, numerals, and punctuation characters. ASCII characters
0 through 127 are called the lower ASCII set. The upper ASCII
set consists of characters 128 through 255, and includes foreign
language characters, line drawing characters, and mathematical
symbols.
"ASCII text". ASCII text refers to text without any special
formatting features. (Formatting features include margin
setting, centering, underlining, and all the other special
features a word processor adds to simple text.) Each character
in ASCII text has the meaning commonly assigned to that
character. In contrast, word processing text includes ASCII
characters that are assigned a special meaning by the word
processing program. For example, a word processing program might
treat the upper ASCII characters £ and ¥, taken together, as an
instruction to begin underlining. The two characters would lose
their commonly accepted meaning as the symbols for the pound and
the yen, and together would take on the new meaning "begin
underline here".
"Full path name". The full path name of a file includes the
name of the disk drive it is located on, the directory it is
located in, and the name of the file. An example would be
C:\WP51\MACROS\MYMACRO.WPM. Notice that the disk drive is
followed by a colon and that each of the directories is followed
by a backslash. A lone backslash refers to the root directory.
"Current or default directory". The current or default
directory, as the name suggests, is the directory that DOS looks
in when you give a file command that does not specify another
directory.
"Path". Path is a command that tells DOS which directories
to search when you instruct it to run a program without
specifying the full path name. DOS will first look in the
default directory, then will search the other directories on your
path. The path is usually set in your Autoexec.bat file.
Suppose, for example, that you have just booted your computer,
and you are in the root directory of the C: drive. If you have
set your prompt to give the current directory, you will see
"C:\". Suppose further, that the WordPerfect program "WP.EXE" is
located in the directory "C:\WP51". If your were to type WP
followed by enter and the program WP.EXE was not on your path,
you would get the message "Bad command or file name". On the
other hand, if "C:\WP51" is on your path, DOS will search through
that directory and run WordPerfect for you.
"Root name and extension". A file's root name consists of
that portion of the filename up to the period. All files have a
root name which may be up to 8 characters long. The extension is
usually optional. It refers to the characters (no more than 3)
following the period. The root name of the file "MYMACRO.WPM" is
"MYMACRO"; the extension is "WPM". The case of a character in a
file name does not matter, because DOS converts all file names to
upper-case.
"Wild cards". DOS wild cards refer to the characters "*"
and "?". The "*" can be substituted for any string of characters
in a file name. The "?" can be substituted for any single
character. Wild cards may be used by MC.COM and M2T.COM to
process more than one file at a time. I hate to say this, but if
you need more information about wild cards, please see your DOS
manual. PC Magazine's DOS Power Tools is an excellent source of
information about MS-DOS. A knowledge of wild card usage is not
required to utilize the MPE4WP tools satisfactorily.
"Macro Editor". Refers to the built in WordPerfect macro
editor.
"Compiler and source file". A compiler converts text
instructions contained in a source file into machine language.
The contents of a source file are sometimes referred to as the
source code. The source file converted by MC.COM, the Macro
Compiler, looks almost the same as the text of a macro in the
Macro Editor. This source file is converted by MC.COM into an
executable WordPerfect macro. Why call MC.COM a compiler instead
of a conversion program? First, because it is an accurate
description. And second, because it's more fun and gives one a
feeling of importance.
"Screen". A screen refers to one of many types of prompts
that may be created in WordPerfect macros. A screen may be as
simple as a bottom line prompt or as complex as a full screen
display with mnemonic prompts, as are found in some of the MPE4WP
macros.
"Macro Command and Key Command". WordPerfect macros employ
two special types of commands to control the operation of the
macro. These are Macro Commands and Key Commands, both are
enclosed in braces ({}). The Macro Commands are special
programming commands that apply only to macros, such as
{DISPLAY ON} and {IF}. They are accessed in the Macro Editor by
pressing the Ctrl-PgUp key. Key Commands are representations of
the keys that you customarily use at the WordPerfect editing
screen, including {Spell}, {Tab}, and {Format}. In the Macro
Editor, Key Commands appear as all upper-case, while Key Commands
are in initial capital letters. A complete list of Macro and Key
Commands presently supported by WordPerfect and MPE4WP is
included in the file COMMAND.LST.